<!--
 * @Descripttion:  图片加载方式
 * @version: 0.0.1
 * @Author: linchun
 * @Date: 2021年12月22日10:12:39
 * @LastEditors: linchun
 * @LastEditTime: 2021-12-24 11:01:44
-->
<template>
    <el-select v-model="val" @change="change">
        <el-option
            v-for="item in options"
            :key="item.value"
            :label="item.label"
            :value="item.value"
        ></el-option>
    </el-select>
</template>
<script>
export default {
    props: ['value','type'],
    data() {
        return {
            val: this.value,
            options: [
                {
                    value: 'fill',
                    label: '填充',
                },
                {
                    value: 'contain',
                    label: '镜像',
                },
                {
                    value: 'cover',
                    label: '覆盖',
                },
                {
                    value: 'none',
                    label: 'none',
                },
                {
                    value: 'scale-down',
                    label: '缩放',
                },
            ],
        };
    },
    methods: {
        change(data) {
            this.$emit('change', {
                key:this.type,
                value:data
            });
        },
    },
};
</script>
